<template>
  <a-modal :maskClosable="false"
    :title='title'
    :width='1024'
    :visible='visible'
    :confirmLoading='confirmLoading'
    @ok='handleOk'
    @cancel='handleCancel'
    cancelText='关闭'>

    <a-spin :spinning='confirmLoading'>
        <a-row>
            <a-radio-group  style="margin:8px">
              <a-radio-button value="top">
                今天
              </a-radio-button>
              <a-radio-button value="bottom">
                明天
              </a-radio-button>
              <a-radio-button value="left">
                本周
              </a-radio-button>
            </a-radio-group>
            <a-range-picker>
              <template slot="dateRender" slot-scope="current">
                <div class="ant-calendar-date" :style="getCurrentStyle(current)">
                  {{ current.date() }}
                </div>
              </template>
            </a-range-picker>
        </a-row>

      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="userId"
        :pagination="ipagination"
        :columns="columns"
        :dataSource="dataSource"
        :loading="loading"
        @change="handleTableChange"
      style="margin-top: 30px">
      </a-table>

    </a-spin>
  </a-modal>
</template>

<script>
import { httpAction, putAction, getAction, postAction } from '@/api/manage'
import { queryall } from '@api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
  name: 'WorkModal',
  mixins: [JeecgListMixin],
  components: {},
  data() {
    return {
      title: '操作',
      visible: false,
      disabled: true,
      layout: {
        labelCol: { span: 4 },
        wrapperCol: { span: 14 }
      },
      confirmLoading: false,
      columns: [
        {
          title: '患者',
          width: '10%',
          align: 'center',
          dataIndex: 'realname',
        },
        {
          title: '挂号费',
          width: '5%',
          align: 'center',
          dataIndex: 'departName'
        },
        {
          title: '预约时间',
          width: '5%',
          align: 'center',
          dataIndex: 'post',
        },
        {
          title: '预约状态',
          width: '5%',
          align: 'center',
          dataIndex: 'phone'
        },
      ],
      url: {
        list: '/sys/user/queryByOrgCodeForAddressList',
        listByPosition: '/sys/position/list'
      },
      rolesOptions: []
    }
  },
  created() {
  },
  methods: {
    show() {
      this.visible = true
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleOk() {
      this.close()
    },
    handleCancel() {
      this.close()
    },
    getCurrentStyle(current, today) {
      const style = {};
      if (current.date() === 1) {
        style.border = '1px solid #1890ff';
        style.borderRadius = '50%';
      }
      return style;
    },

  }
}
</script>

<style lang="less" scoped>
.circle-cust {
  position: relative;
  top: 28px;
  left: -100%;
}

.extra-wrapper {
  line-height: 55px;
  padding-right: 24px;

  .extra-item {
    display: inline-block;
    margin-right: 24px;

    a {
      margin-left: 24px;
    }
  }
}

/* 首页访问量统计 */
.head-info {
  position: relative;
  text-align: left;
  padding: 0 32px 0 0;
  min-width: 125px;

  &.center {
    text-align: center;
    padding: 0 32px;
  }

  span {
    color: rgba(0, 0, 0, .45);
    display: inline-block;
    font-size: .95rem;
    line-height: 42px;
    margin-bottom: 4px;
  }

  p {
    line-height: 42px;
    margin: 0;

    a {
      font-weight: 600;
      font-size: 1rem;
    }
  }
}

.king-bg-yellow {
  background: #ffc454;
}

.king-bg-blue {
  background: #6495ed;
}

.king-bg-red {
  background: #fc7778;
}

.king-bg-green {
  background: #4fb591;
}

.king-col {
  margin-bottom: 10px
}

.king-box {
  padding: 10px 15px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden
}


.king-box .king-titbox {
  color: #999
}

.king-box .king-titbox .king-icon {
  color: #fff;
  border-radius: 50%;
  padding: 5px;
  background: #6495ed;
  margin-right: 10px
}

.king-box .king-sjbg {
  padding: 5px 10px
}

.king-box .king-num {
  line-height: 24px;
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  margin-bottom: 10px;
  text-align: center;
  height: 24px
}

.king-blue {
  border: 1px solid #d9e7ff;
  border-radius: 5px
}


.king-box2 {
  padding: 10px 15px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
  border-radius: 5px;
}

.king-box2 img {
  width: 40px;
  height: 40px;
  margin-right: 20px;
}

.king-box2 .king-num {
  font-size: 30px;
  margin: 0;
  color: #fff;
  height: 40px;
}

.king-box2 .king-tit {
  font-size: 18px;
  color: #fff;
  margin: 0;
}

.king-flex-vcenter {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center
}

.king-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis
}

.king-center {
  text-align: center
}

.king-bg-blue {
  background: #6495ed
}

.king-bg-red {
  background: #fc7778
}

.king-bg-green {
  background: #4fb591
}

.king-bg-yellow {
  background: #ffc454
}

.king-color-blue {
  color: #2989ff
}

.king-color-red {
  color: #fb5c55
}

.king-color-green {
  color: #4fb591
}

.king-color-yellow {
  color: #ffa823
}

.king-space-between {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between
}
</style>